package com.demo.pojo.ret;

import com.demo.pojo.enums.Ret;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * @Classname RetResult
 * @Description TODO
 * @Date 2021/3/15 22:46
 * @Created by 张斌
 */
public class RetResult<T> {
    private int retCode;
    private String retMessage;
    private T t;

    public RetResult(Ret ret){
        this.retCode = ret.getCode();
        this.retMessage=ret.getMessage();
    }

    public int getRetCode() {
        return retCode;
    }

    public void setRetCode(int retCode) {
        this.retCode = retCode;
    }

    public String getRetMessage() {
        return retMessage;
    }

    public void setRetMessage(String retMessage) {
        this.retMessage = retMessage;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
